package com.imyuanma.qingyun.lowcode.controller;

import com.imyuanma.qingyun.common.model.response.Result;
import com.imyuanma.qingyun.lowcode.model.data.LcpDbTableDO;
import com.imyuanma.qingyun.lowcode.service.ILcpDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 数据库web
 *
 * @author wangjy
 * @date 2022/05/04 15:36:29
 */
@RestController
@RequestMapping(value = "/lowcode/db", method = {RequestMethod.POST})
public class LcpDbController {
    /**
     * 数据库服务
     */
    @Autowired
    private ILcpDbService dbService;

    /**
     * 查询数据库表列表
     * @return
     */
    @RequestMapping("/getTableList")
    public Result<List<LcpDbTableDO>> getTableList() {
        return Result.success(dbService.getTableList());
    }
}
